diff --git a/drivers/Kconfig b/drivers/Kconfig
index ed8a39c..b1ada1c 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -30,8 +30,6 @@
 
 source "drivers/demo/Kconfig"
 
-source "drivers/board/Kconfig"
-
 source "drivers/ddr/fsl/Kconfig"
 
 source "drivers/dfu/Kconfig"
@@ -114,6 +112,8 @@
 
 source "drivers/spmi/Kconfig"
 
+source "drivers/sysinfo/Kconfig"
+
 source "drivers/sysreset/Kconfig"
 
 source "drivers/tee/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index 33f1d53..e371bc3 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -27,9 +27,9 @@
 obj-$(CONFIG_$(SPL_TPL_)VIRTIO) += virtio/
 obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox/
 obj-$(CONFIG_$(SPL_)REMOTEPROC) += remoteproc/
+obj-$(CONFIG_$(SPL_)SYSINFO) += sysinfo/
 obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/
 obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += power/acpi_pmc/
-obj-$(CONFIG_$(SPL_)BOARD) += board/
 obj-$(CONFIG_XEN) += xen/
 obj-$(CONFIG_$(SPL_)FPGA) += fpga/
 
diff --git a/drivers/board/Makefile b/drivers/board/Makefile
deleted file mode 100644
index cc16361..0000000
--- a/drivers/board/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2017
-# Mario Six,  Guntermann & Drunck GmbH, mario.six@gdsys.cc
-obj-y += board-uclass.o
-obj-$(CONFIG_BOARD_GAZERBEAM) += gazerbeam.o
-obj-$(CONFIG_BOARD_SANDBOX) += sandbox.o
diff --git a/drivers/board/board-uclass.c b/drivers/board/board-uclass.c
deleted file mode 100644
index b5485e9..0000000
--- a/drivers/board/board-uclass.c
+++ /dev/null
@@ -1,71 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2017
- * Mario Six,  Guntermann & Drunck GmbH, mario.six@gdsys.cc
- */
-
-#include <common.h>
-#include <dm.h>
-#include <board.h>
-
-int board_get(struct udevice **devp)
-{
-	return uclass_first_device_err(UCLASS_BOARD, devp);
-}
-
-int board_detect(struct udevice *dev)
-{
-	struct board_ops *ops = board_get_ops(dev);
-
-	if (!ops->detect)
-		return -ENOSYS;
-
-	return ops->detect(dev);
-}
-
-int board_get_fit_loadable(struct udevice *dev, int index,
-			   const char *type, const char **strp)
-{
-	struct board_ops *ops = board_get_ops(dev);
-
-	if (!ops->get_fit_loadable)
-		return -ENOSYS;
-
-	return ops->get_fit_loadable(dev, index, type, strp);
-}
-
-int board_get_bool(struct udevice *dev, int id, bool *val)
-{
-	struct board_ops *ops = board_get_ops(dev);
-
-	if (!ops->get_bool)
-		return -ENOSYS;
-
-	return ops->get_bool(dev, id, val);
-}
-
-int board_get_int(struct udevice *dev, int id, int *val)
-{
-	struct board_ops *ops = board_get_ops(dev);
-
-	if (!ops->get_int)
-		return -ENOSYS;
-
-	return ops->get_int(dev, id, val);
-}
-
-int board_get_str(struct udevice *dev, int id, size_t size, char *val)
-{
-	struct board_ops *ops = board_get_ops(dev);
-
-	if (!ops->get_str)
-		return -ENOSYS;
-
-	return ops->get_str(dev, id, size, val);
-}
-
-UCLASS_DRIVER(board) = {
-	.id		= UCLASS_BOARD,
-	.name		= "board",
-	.post_bind	= dm_scan_fdt_dev,
-};
diff --git a/drivers/board/sandbox.c b/drivers/board/sandbox.c
deleted file mode 100644
index 50621e4..0000000
--- a/drivers/board/sandbox.c
+++ /dev/null
@@ -1,107 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2018
- * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
- */
-
-#include <common.h>
-#include <dm.h>
-#include <board.h>
-
-#include "sandbox.h"
-
-struct board_sandbox_priv {
-	bool called_detect;
-	int test_i1;
-	int test_i2;
-};
-
-char vacation_spots[][64] = {"R'lyeh", "Dreamlands", "Plateau of Leng",
-			     "Carcosa", "Yuggoth", "The Nameless City"};
-
-int board_sandbox_detect(struct udevice *dev)
-{
-	struct board_sandbox_priv *priv = dev_get_priv(dev);
-
-	priv->called_detect = true;
-	priv->test_i2 = 100;
-
-	return 0;
-}
-
-int board_sandbox_get_bool(struct udevice *dev, int id, bool *val)
-{
-	struct board_sandbox_priv *priv = dev_get_priv(dev);
-
-	switch (id) {
-	case BOOL_CALLED_DETECT:
-		/* Checks if the dectect method has been called */
-		*val = priv->called_detect;
-		return 0;
-	}
-
-	return -ENOENT;
-}
-
-int board_sandbox_get_int(struct udevice *dev, int id, int *val)
-{
-	struct board_sandbox_priv *priv = dev_get_priv(dev);
-
-	switch (id) {
-	case INT_TEST1:
-		*val = priv->test_i1;
-		/* Increments with every call */
-		priv->test_i1++;
-		return 0;
-	case INT_TEST2:
-		*val = priv->test_i2;
-		/* Decrements with every call */
-		priv->test_i2--;
-		return 0;
-	}
-
-	return -ENOENT;
-}
-
-int board_sandbox_get_str(struct udevice *dev, int id, size_t size, char *val)
-{
-	struct board_sandbox_priv *priv = dev_get_priv(dev);
-	int i1 = priv->test_i1;
-	int i2 = priv->test_i2;
-	int index = (i1 * i2) % ARRAY_SIZE(vacation_spots);
-
-	switch (id) {
-	case STR_VACATIONSPOT:
-		/* Picks a vacation spot depending on i1 and i2 */
-		snprintf(val, size, vacation_spots[index]);
-		return 0;
-	}
-
-	return -ENOENT;
-}
-
-static const struct udevice_id board_sandbox_ids[] = {
-	{ .compatible = "sandbox,board_sandbox" },
-	{ /* sentinel */ }
-};
-
-static const struct board_ops board_sandbox_ops = {
-	.detect = board_sandbox_detect,
-	.get_bool = board_sandbox_get_bool,
-	.get_int = board_sandbox_get_int,
-	.get_str = board_sandbox_get_str,
-};
-
-int board_sandbox_probe(struct udevice *dev)
-{
-	return 0;
-}
-
-U_BOOT_DRIVER(board_sandbox) = {
-	.name           = "board_sandbox",
-	.id             = UCLASS_BOARD,
-	.of_match       = board_sandbox_ids,
-	.ops		= &board_sandbox_ops,
-	.priv_auto_alloc_size = sizeof(struct board_sandbox_priv),
-	.probe          = board_sandbox_probe,
-};
diff --git a/drivers/board/Kconfig b/drivers/sysinfo/Kconfig
similarity index 65%
rename from drivers/board/Kconfig
rename to drivers/sysinfo/Kconfig
index 254f657..3914150 100644
--- a/drivers/board/Kconfig
+++ b/drivers/sysinfo/Kconfig
@@ -1,24 +1,24 @@
-menuconfig BOARD
-	bool "Device Information"
+menuconfig SYSINFO
+	bool "Device System Information"
 	help
 	  Support methods to query hardware configurations from internal
 	  mechanisms (e.g. reading GPIO values, determining the presence of
 	  devices on busses, etc.). This enables the usage of U-Boot with
 	  modular board architectures.
 
-if BOARD
+if SYSINFO
 
-config SPL_BOARD
+config SPL_SYSINFO
 	depends on SPL_DM
 	bool "Enable board driver support in SPL"
 
-config BOARD_GAZERBEAM
-	bool "Enable board driver for the Gazerbeam board"
+config SYSINFO_GAZERBEAM
+	bool "Enable sysinfo driver for the Gazerbeam board"
 	help
 	  Support querying device information for the gdsys Gazerbeam board.
 
-config BOARD_SANDBOX
-	bool "Enable board driver for the Sandbox board"
+config SYSINFO_SANDBOX
+	bool "Enable sysinfo driver for the Sandbox board"
 	help
 	  Support querying device information for the Sandbox boards.
 
diff --git a/drivers/sysinfo/Makefile b/drivers/sysinfo/Makefile
new file mode 100644
index 0000000..aecf0b0
--- /dev/null
+++ b/drivers/sysinfo/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2017
+# Mario Six,  Guntermann & Drunck GmbH, mario.six@gdsys.cc
+obj-y += sysinfo-uclass.o
+obj-$(CONFIG_SYSINFO_GAZERBEAM) += gazerbeam.o
+obj-$(CONFIG_SYSINFO_SANDBOX) += sandbox.o
diff --git a/drivers/board/gazerbeam.c b/drivers/sysinfo/gazerbeam.c
similarity index 69%
rename from drivers/board/gazerbeam.c
rename to drivers/sysinfo/gazerbeam.c
index ed50fc5..9e7a496 100644
--- a/drivers/board/gazerbeam.c
+++ b/drivers/sysinfo/gazerbeam.c
@@ -6,7 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
-#include <board.h>
+#include <sysinfo.h>
 #include <i2c.h>
 #include <log.h>
 #include <asm/gpio.h>
@@ -27,16 +27,16 @@
 static const int CON_GPIO_NO = 1;
 
 /**
- * struct board_gazerbeam_priv - Private data structure for the gazerbeam board
- *				 driver.
- * @reset_gpios:  GPIOs for the board's reset GPIOs.
- * @var_gpios:	  GPIOs for the board's hardware variant GPIOs
- * @ver_gpios:	  GPIOs for the board's hardware version GPIOs
- * @variant:	  Container for the board's hardware variant (CON/CPU)
- * @multichannel: Container for the board's multichannel variant (MC4/MC2/SC)
- * @hwversion:	  Container for the board's hardware version
+ * struct sysinfo_gazerbeam_priv - Private data structure for the gazerbeam
+ *	sysinfo driver
+ * @reset_gpios:  GPIOs for the sysinfo's reset GPIOs.
+ * @var_gpios:	  GPIOs for the sysinfo's hardware variant GPIOs
+ * @ver_gpios:	  GPIOs for the sysinfo's hardware version GPIOs
+ * @variant:	  Container for the sysinfo's hardware variant (CON/CPU)
+ * @multichannel: Container for the sysinfo's multichannel variant (MC4/MC2/SC)
+ * @hwversion:	  Container for the sysinfo's hardware version
  */
-struct board_gazerbeam_priv {
+struct sysinfo_gazerbeam_priv {
 	struct gpio_desc reset_gpios[2];
 	struct gpio_desc var_gpios[2];
 	struct gpio_desc ver_gpios[4];
@@ -46,19 +46,19 @@
 };
 
 /**
- * _read_board_variant_data() - Read variant information from the hardware.
- * @dev: The board device for which to determine the multichannel and device
+ * _read_sysinfo_variant_data() - Read variant information from the hardware.
+ * @dev: The sysinfo device for which to determine the multichannel and device
  *	 type information.
  *
- * The data read from the board's hardware (mostly hard-wired GPIOs) is stored
+ * The data read from the sysinfo's hardware (mostly hard-wired GPIOs) is stored
  * in the private data structure of the driver to be used by other driver
  * methods.
  *
  * Return: 0 if OK, -ve on error.
  */
-static int _read_board_variant_data(struct udevice *dev)
+static int _read_sysinfo_variant_data(struct udevice *dev)
 {
-	struct board_gazerbeam_priv *priv = dev_get_priv(dev);
+	struct sysinfo_gazerbeam_priv *priv = dev_get_priv(dev);
 	struct udevice *i2c_bus;
 	struct udevice *dummy;
 	char *listname;
@@ -129,10 +129,10 @@
 }
 
 /**
- * _read_hwversion() - Read the hardware version from the board.
- * @dev: The board device for which to read the hardware version.
+ * _read_hwversion() - Read the hardware version from the sysinfo.
+ * @dev: The sysinfo device for which to read the hardware version.
  *
- * The hardware version read from the board (from hard-wired GPIOs) is stored
+ * The hardware version read from the sysinfo (from hard-wired GPIOs) is stored
  * in the private data structure of the driver to be used by other driver
  * methods.
  *
@@ -140,7 +140,7 @@
  */
 static int _read_hwversion(struct udevice *dev)
 {
-	struct board_gazerbeam_priv *priv = dev_get_priv(dev);
+	struct sysinfo_gazerbeam_priv *priv = dev_get_priv(dev);
 	int res;
 
 	res = gpio_request_list_by_name(dev, "ver-gpios", priv->ver_gpios,
@@ -172,11 +172,11 @@
 	return 0;
 }
 
-static int board_gazerbeam_detect(struct udevice *dev)
+static int sysinfo_gazerbeam_detect(struct udevice *dev)
 {
 	int res;
 
-	res = _read_board_variant_data(dev);
+	res = _read_sysinfo_variant_data(dev);
 	if (res) {
 		debug("%s: Error reading multichannel variant (err = %d)\n",
 		      dev->name, res);
@@ -193,9 +193,9 @@
 	return 0;
 }
 
-static int board_gazerbeam_get_int(struct udevice *dev, int id, int *val)
+static int sysinfo_gazerbeam_get_int(struct udevice *dev, int id, int *val)
 {
-	struct board_gazerbeam_priv *priv = dev_get_priv(dev);
+	struct sysinfo_gazerbeam_priv *priv = dev_get_priv(dev);
 
 	switch (id) {
 	case BOARD_MULTICHANNEL:
@@ -215,19 +215,19 @@
 	return 0;
 }
 
-static const struct udevice_id board_gazerbeam_ids[] = {
-	{ .compatible = "gdsys,board_gazerbeam" },
+static const struct udevice_id sysinfo_gazerbeam_ids[] = {
+	{ .compatible = "gdsys,sysinfo-gazerbeam" },
 	{ /* sentinel */ }
 };
 
-static const struct board_ops board_gazerbeam_ops = {
-	.detect = board_gazerbeam_detect,
-	.get_int = board_gazerbeam_get_int,
+static const struct sysinfo_ops sysinfo_gazerbeam_ops = {
+	.detect = sysinfo_gazerbeam_detect,
+	.get_int = sysinfo_gazerbeam_get_int,
 };
 
-static int board_gazerbeam_probe(struct udevice *dev)
+static int sysinfo_gazerbeam_probe(struct udevice *dev)
 {
-	struct board_gazerbeam_priv *priv = dev_get_priv(dev);
+	struct sysinfo_gazerbeam_priv *priv = dev_get_priv(dev);
 	int gpio_num, i;
 
 	gpio_num = gpio_request_list_by_name(dev, "reset-gpios",
@@ -255,11 +255,11 @@
 	return 0;
 }
 
-U_BOOT_DRIVER(board_gazerbeam) = {
-	.name           = "board_gazerbeam",
-	.id             = UCLASS_BOARD,
-	.of_match       = board_gazerbeam_ids,
-	.ops		= &board_gazerbeam_ops,
-	.priv_auto_alloc_size = sizeof(struct board_gazerbeam_priv),
-	.probe          = board_gazerbeam_probe,
+U_BOOT_DRIVER(sysinfo_gazerbeam) = {
+	.name           = "sysinfo_gazerbeam",
+	.id             = UCLASS_SYSINFO,
+	.of_match       = sysinfo_gazerbeam_ids,
+	.ops		= &sysinfo_gazerbeam_ops,
+	.priv_auto_alloc_size = sizeof(struct sysinfo_gazerbeam_priv),
+	.probe          = sysinfo_gazerbeam_probe,
 };
diff --git a/drivers/board/gazerbeam.h b/drivers/sysinfo/gazerbeam.h
similarity index 100%
rename from drivers/board/gazerbeam.h
rename to drivers/sysinfo/gazerbeam.h
diff --git a/drivers/sysinfo/sandbox.c b/drivers/sysinfo/sandbox.c
new file mode 100644
index 0000000..62a1cb4
--- /dev/null
+++ b/drivers/sysinfo/sandbox.c
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2018
+ * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <sysinfo.h>
+
+#include "sandbox.h"
+
+struct sysinfo_sandbox_priv {
+	bool called_detect;
+	int test_i1;
+	int test_i2;
+};
+
+char vacation_spots[][64] = {"R'lyeh", "Dreamlands", "Plateau of Leng",
+			     "Carcosa", "Yuggoth", "The Nameless City"};
+
+int sysinfo_sandbox_detect(struct udevice *dev)
+{
+	struct sysinfo_sandbox_priv *priv = dev_get_priv(dev);
+
+	priv->called_detect = true;
+	priv->test_i2 = 100;
+
+	return 0;
+}
+
+int sysinfo_sandbox_get_bool(struct udevice *dev, int id, bool *val)
+{
+	struct sysinfo_sandbox_priv *priv = dev_get_priv(dev);
+
+	switch (id) {
+	case BOOL_CALLED_DETECT:
+		/* Checks if the dectect method has been called */
+		*val = priv->called_detect;
+		return 0;
+	}
+
+	return -ENOENT;
+}
+
+int sysinfo_sandbox_get_int(struct udevice *dev, int id, int *val)
+{
+	struct sysinfo_sandbox_priv *priv = dev_get_priv(dev);
+
+	switch (id) {
+	case INT_TEST1:
+		*val = priv->test_i1;
+		/* Increments with every call */
+		priv->test_i1++;
+		return 0;
+	case INT_TEST2:
+		*val = priv->test_i2;
+		/* Decrements with every call */
+		priv->test_i2--;
+		return 0;
+	}
+
+	return -ENOENT;
+}
+
+int sysinfo_sandbox_get_str(struct udevice *dev, int id, size_t size, char *val)
+{
+	struct sysinfo_sandbox_priv *priv = dev_get_priv(dev);
+	int i1 = priv->test_i1;
+	int i2 = priv->test_i2;
+	int index = (i1 * i2) % ARRAY_SIZE(vacation_spots);
+
+	switch (id) {
+	case STR_VACATIONSPOT:
+		/* Picks a vacation spot depending on i1 and i2 */
+		snprintf(val, size, vacation_spots[index]);
+		return 0;
+	}
+
+	return -ENOENT;
+}
+
+static const struct udevice_id sysinfo_sandbox_ids[] = {
+	{ .compatible = "sandbox,sysinfo-sandbox" },
+	{ /* sentinel */ }
+};
+
+static const struct sysinfo_ops sysinfo_sandbox_ops = {
+	.detect = sysinfo_sandbox_detect,
+	.get_bool = sysinfo_sandbox_get_bool,
+	.get_int = sysinfo_sandbox_get_int,
+	.get_str = sysinfo_sandbox_get_str,
+};
+
+int sysinfo_sandbox_probe(struct udevice *dev)
+{
+	return 0;
+}
+
+U_BOOT_DRIVER(sysinfo_sandbox) = {
+	.name           = "sysinfo_sandbox",
+	.id             = UCLASS_SYSINFO,
+	.of_match       = sysinfo_sandbox_ids,
+	.ops		= &sysinfo_sandbox_ops,
+	.priv_auto_alloc_size = sizeof(struct sysinfo_sandbox_priv),
+	.probe          = sysinfo_sandbox_probe,
+};
diff --git a/drivers/board/sandbox.h b/drivers/sysinfo/sandbox.h
similarity index 100%
rename from drivers/board/sandbox.h
rename to drivers/sysinfo/sandbox.h
diff --git a/drivers/sysinfo/sysinfo-uclass.c b/drivers/sysinfo/sysinfo-uclass.c
new file mode 100644
index 0000000..6df58fe
--- /dev/null
+++ b/drivers/sysinfo/sysinfo-uclass.c
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2017
+ * Mario Six,  Guntermann & Drunck GmbH, mario.six@gdsys.cc
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <sysinfo.h>
+
+int sysinfo_get(struct udevice **devp)
+{
+	return uclass_first_device_err(UCLASS_SYSINFO, devp);
+}
+
+int sysinfo_detect(struct udevice *dev)
+{
+	struct sysinfo_ops *ops = sysinfo_get_ops(dev);
+
+	if (!ops->detect)
+		return -ENOSYS;
+
+	return ops->detect(dev);
+}
+
+int sysinfo_get_fit_loadable(struct udevice *dev, int index, const char *type,
+			     const char **strp)
+{
+	struct sysinfo_ops *ops = sysinfo_get_ops(dev);
+
+	if (!ops->get_fit_loadable)
+		return -ENOSYS;
+
+	return ops->get_fit_loadable(dev, index, type, strp);
+}
+
+int sysinfo_get_bool(struct udevice *dev, int id, bool *val)
+{
+	struct sysinfo_ops *ops = sysinfo_get_ops(dev);
+
+	if (!ops->get_bool)
+		return -ENOSYS;
+
+	return ops->get_bool(dev, id, val);
+}
+
+int sysinfo_get_int(struct udevice *dev, int id, int *val)
+{
+	struct sysinfo_ops *ops = sysinfo_get_ops(dev);
+
+	if (!ops->get_int)
+		return -ENOSYS;
+
+	return ops->get_int(dev, id, val);
+}
+
+int sysinfo_get_str(struct udevice *dev, int id, size_t size, char *val)
+{
+	struct sysinfo_ops *ops = sysinfo_get_ops(dev);
+
+	if (!ops->get_str)
+		return -ENOSYS;
+
+	return ops->get_str(dev, id, size, val);
+}
+
+UCLASS_DRIVER(sysinfo) = {
+	.id		= UCLASS_SYSINFO,
+	.name		= "sysinfo",
+	.post_bind	= dm_scan_fdt_dev,
+};
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index ba77042..6139252 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -5,12 +5,12 @@
  */
 
 #include <common.h>
-#include <board.h>
 #include <clk.h>
 #include <dm.h>
 #include <irq_func.h>
 #include <log.h>
 #include <status_led.h>
+#include <sysinfo.h>
 #include <time.h>
 #include <timer.h>
 #include <watchdog.h>
@@ -97,7 +97,7 @@
 {
 	immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
 	struct udevice *csb;
-	struct udevice *board;
+	struct udevice *sysinfo;
 	struct udevice *timer;
 	struct mpc83xx_timer_priv *timer_priv;
 	struct clk clock;
@@ -112,12 +112,12 @@
 
 	timer_priv = dev_get_priv(timer);
 
-	if (board_get(&board)) {
-		debug("%s: board device could not be fetched.\n", __func__);
+	if (sysinfo_get(&sysinfo)) {
+		debug("%s: sysinfo device could not be fetched.\n", __func__);
 		return -ENOENT;
 	}
 
-	ret = uclass_get_device_by_phandle(UCLASS_SIMPLE_BUS, board,
+	ret = uclass_get_device_by_phandle(UCLASS_SIMPLE_BUS, sysinfo,
 					   "csb", &csb);
 	if (ret) {
 		debug("%s: Could not retrieve CSB device (error: %d)",
